package org.springcloud.wisdom.spring_01_canteen.indent;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("wisdom.indent")
public class Indent {
    //主键(订单号)
    @TableId(type = IdType.AUTO, value = "wisdom.indent.indentid")
    private String indentid;
    //买家id
    @TableField("wisdom.indent.useid")
    private Integer useid;
    //地址id
    @TableField("wisdom.indent.addressid")
    private Integer addressid;
    //商家id
    @TableField("wisdom.indent.mallid")
    private Integer mallid;
    //下单时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @TableField("wisdom.indent.orderdate")
    private String orderdate;
    //总价
    @TableField("totalprice")
    private Double totalprice;
    //支付状态
    @TableField("wisdom.indent.paystatus")
    private String paystatus;
    //商家接受状态
    @TableField("wisdom.indent.acceptstatus")
    private String acceptstatus;
    //签收状态
    @TableField("wisdom.indent.signstatus")
    private String signstatus;
    //姓名
    @TableField("wisdom.indent.name")
    private String name;
    //地址
    @TableField("wisdom.indent.address")
    private String address;
    //电话号
    @TableField("wisdom.indent.phone")
    private String phone;
    //店铺名
    @TableField("wisdom.indent.mname")
    private String mname;
    //支付编号
    @TableField("wisdom.indent.payid")
    private String payid;
    //支付时间
    @TableField("wisdom.indent.paytime")
    private String paytime;
    //预计送达时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @TableField("wisdom.indent.gettime")
    private String gettime;
}
